﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Photos.aspx.cs" Inherits="milanov.Category" %>
<%-- Thom - gridview/categorie parameter & Jacco - javascript foto gallery --%>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="js/lightbox-2.6.min.js"></script>
    <link href="css/lightbox.css" rel="stylesheet" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">
        <h1></h1>
        <h2><asp:Label ID="cat" runat="server" Text=""></asp:Label></h2><br />
<asp:GridView ID="GridView1" runat="server" OnPageIndexChanging="GridView1_PageIndexChanging" AllowPaging="True" AutoGenerateColumns="False"
                CellPadding="4" DataKeyNames="FileID" ForeColor="Black"
                PageSize="25" Font-Bold="False" Font-Names="Verdana"
                GridLines="None" Font-Size="Small" BackColor="White" Width="900px">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:BoundField DataField="Name" HeaderText="Naam" SortExpression="Name" />
                    <asp:BoundField DataField="Comment" HeaderText="Omschrijving" SortExpression="" />
                    <asp:TemplateField HeaderText="Grootte" SortExpression="Filesize">
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%#(Convert.ToDecimal(Eval("Filesize")) / 1024).ToString("0,0") + " kb" %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Resolutie" SortExpression="">
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%#Eval("Width")+ "x" + Eval("Height")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Foto">
                        <ItemTemplate>
                            <div class ="image1">
                            <a href="<%# "/Pictures/demo/demo_" + Eval("Filename") %>" data-lightbox="image-1">
                                <img src="<%# "/Pictures/demo/demo_" + Eval("Filename") %>" alt="" width="100" />
                            </a>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Prijs" SortExpression="Price">
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# "€" + Eval("Price", "{0:0.00}") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Bestellen">
                        <ItemTemplate>
                            <asp:HyperLink ID="AddToCart" runat="server" ImageUrl="~/Images/bestel.png" ToolTip="Bestel deze foto!"
                                NavigateUrl='<%# Eval("FileID", @"~/Cart.aspx?add={0}") %>'
                                Text='Bestel'>
                            </asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <FooterStyle BackColor="#CCCC99" />
                <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                <RowStyle BackColor="#F7F7DE" />
                <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                <SortedAscendingCellStyle BackColor="#FBFBF2" />
                <SortedAscendingHeaderStyle BackColor="#848384" />
                <SortedDescendingCellStyle BackColor="#EAEAD3" />
                <SortedDescendingHeaderStyle BackColor="#575357" />
            </asp:GridView>
</asp:Content>
